package speed;

public class Recrusion02 {
	public static void main(String[] args) {
		Num2 num2 = new Num2();
		System.out.println(num2.method(5));
		System.out.println("This is Recrusion: The first in,The last out");
	}

}
class Num2{
	public int method(int n) {
		if (n==1) {
			return 1;
		}else {
			return method(n-1)*n;
		}
	}
	
}

